﻿using pbvs.Models;
using pbvs.Models.DomainModels;
using pbvs.Models.ViewModels;

namespace pbvs.Services.ServiceExtensions
{
    public static class PbvsServiceExtensions {

	    public static ValuationRequestDomainModel ToDomainModel(this ValuationRequest value)
	    {
		    return new ValuationRequestDomainModel
			           {
				           Id = value.Id,
				           CaseId = value.CaseId,
				           PlanName = value.PlanName,
				           ParticipantFirstName = value.ParticipantFirstName,
				           ParticipantLastName = value.ParticipantLastName,
				           Gender = value.Gender,
				           Dob = value.Dob,
				           Doh = value.Doh,
				           Dot = value.Dot,
				           RetirementDate = value.RetirementDate,
				           BenefitAtRetirement = value.BenefitAtRetirement,
				           EarnedDate = value.EarnedDate,
				           AnnuityType = value.AnnuityType,
				           ValuationDate = value.ValuationDate,
				           OverrideInterest = value.OverrideInterest,
				           InterestRate = value.InterestRate,
                           InterestRateThereafter = value.InterestRateThereafter,
				           SubjectToCola = value.SubjectToCola,
				           Cola = value.Cola,
				           CalculateMarriage = value.CalculateMarriage,
				           UseFractional = value.UseFractional,
				           MaritalPortion = value.MaritalPortion,
				           MarriageDate = value.MarriageDate,
				           EarningStartDate = value.EarnedDate,
				           MarriageEarningEndDate = value.MarriageEarningEndDate,
				           Survivorship = value.Survivorship,
				           SurvivorFirstName = value.SurvivorFirstName,
				           SurvivorLastName = value.SurvivorLastName,
				           SurvivorGender = value.SurvivorGender,
				           SurvivorDob = value.SurvivorDob,
				           SurvivorshipPercentage = value.SurvivorshipPercentage
			           };
	    }
    }
}
